
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type StoreOrderRequest struct {

	Pid string `json:"pid" form:"pid"`

	OrderId string `json:"order_id" form:"order_id"`

	TradeNo string `json:"trade_no" form:"trade_no"`

	Uid string `json:"uid" form:"uid"`

	RealName string `json:"real_name" form:"real_name"`

	UserPhone string `json:"user_phone" form:"user_phone"`

	UserAddress string `json:"user_address" form:"user_address"`

	CartId string `json:"cart_id" form:"cart_id"`

	FreightPrice string `json:"freight_price" form:"freight_price"`

	TotalNum string `json:"total_num" form:"total_num"`

	TotalPrice string `json:"total_price" form:"total_price"`

	TotalPostage string `json:"total_postage" form:"total_postage"`

	PayPrice string `json:"pay_price" form:"pay_price"`

	PayPostage string `json:"pay_postage" form:"pay_postage"`

	DeductionPrice string `json:"deduction_price" form:"deduction_price"`

	CouponId string `json:"coupon_id" form:"coupon_id"`

	CouponPrice string `json:"coupon_price" form:"coupon_price"`

	Paid string `json:"paid" form:"paid"`

	PayTime string `json:"pay_time" form:"pay_time"`

	PayType string `json:"pay_type" form:"pay_type"`

	AddTime string `json:"add_time" form:"add_time"`

	Status string `json:"status" form:"status"`

	IsStockUp string `json:"is_stock_up" form:"is_stock_up"`

	RefundStatus string `json:"refund_status" form:"refund_status"`

	RefundType string `json:"refund_type" form:"refund_type"`

	RefundExpress string `json:"refund_express" form:"refund_express"`

	RefundExpressName string `json:"refund_express_name" form:"refund_express_name"`

	RefundReasonWapImg string `json:"refund_reason_wap_img" form:"refund_reason_wap_img"`

	RefundReasonWapExplain string `json:"refund_reason_wap_explain" form:"refund_reason_wap_explain"`

	RefundReasonTime string `json:"refund_reason_time" form:"refund_reason_time"`

	RefundReasonWap string `json:"refund_reason_wap" form:"refund_reason_wap"`

	RefundReason string `json:"refund_reason" form:"refund_reason"`

	RefundPrice string `json:"refund_price" form:"refund_price"`

	DeliveryName string `json:"delivery_name" form:"delivery_name"`

	DeliveryCode string `json:"delivery_code" form:"delivery_code"`

	DeliveryType string `json:"delivery_type" form:"delivery_type"`

	DeliveryId string `json:"delivery_id" form:"delivery_id"`

	KuaidiLabel string `json:"kuaidi_label" form:"kuaidi_label"`

	KuaidiTaskId string `json:"kuaidi_task_id" form:"kuaidi_task_id"`

	KuaidiOrderId string `json:"kuaidi_order_id" form:"kuaidi_order_id"`

	FictitiousContent string `json:"fictitious_content" form:"fictitious_content"`

	DeliveryUid string `json:"delivery_uid" form:"delivery_uid"`

	GainIntegral string `json:"gain_integral" form:"gain_integral"`

	UseIntegral string `json:"use_integral" form:"use_integral"`

	BackIntegral string `json:"back_integral" form:"back_integral"`

	SpreadUid string `json:"spread_uid" form:"spread_uid"`

	SpreadTwoUid string `json:"spread_two_uid" form:"spread_two_uid"`

	OneBrokerage string `json:"one_brokerage" form:"one_brokerage"`

	TwoBrokerage string `json:"two_brokerage" form:"two_brokerage"`

	Mark string `json:"mark" form:"mark"`

	IsDel string `json:"is_del" form:"is_del"`

	Unique string `json:"unique" form:"unique"`

	Remark string `json:"remark" form:"remark"`

	MerId string `json:"mer_id" form:"mer_id"`

	IsMerCheck string `json:"is_mer_check" form:"is_mer_check"`

	CombinationId string `json:"combination_id" form:"combination_id"`

	PinkId string `json:"pink_id" form:"pink_id"`

	Cost string `json:"cost" form:"cost"`

	SeckillId string `json:"seckill_id" form:"seckill_id"`

	BargainId string `json:"bargain_id" form:"bargain_id"`

	AdvanceId string `json:"advance_id" form:"advance_id"`

	VerifyCode string `json:"verify_code" form:"verify_code"`

	StoreId string `json:"store_id" form:"store_id"`

	ShippingType string `json:"shipping_type" form:"shipping_type"`

	ClerkId string `json:"clerk_id" form:"clerk_id"`

	IsChannel string `json:"is_channel" form:"is_channel"`

	IsRemind string `json:"is_remind" form:"is_remind"`

	IsSystemDel string `json:"is_system_del" form:"is_system_del"`

	ChannelType string `json:"channel_type" form:"channel_type"`

	Province string `json:"province" form:"province"`

	ExpressDump string `json:"express_dump" form:"express_dump"`

	VirtualType string `json:"virtual_type" form:"virtual_type"`

	VirtualInfo string `json:"virtual_info" form:"virtual_info"`

	PayUid string `json:"pay_uid" form:"pay_uid"`

	CustomForm string `json:"custom_form" form:"custom_form"`

	StaffId string `json:"staff_id" form:"staff_id"`

	AgentId string `json:"agent_id" form:"agent_id"`

	DivisionId string `json:"division_id" form:"division_id"`

	StaffBrokerage string `json:"staff_brokerage" form:"staff_brokerage"`

	AgentBrokerage string `json:"agent_brokerage" form:"agent_brokerage"`

	DivisionBrokerage string `json:"division_brokerage" form:"division_brokerage"`

}

func (r *StoreOrderRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *StoreOrderRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"pid": "required",

		"order_id": "required",

		"trade_no": "required",

		"uid": "required",

		"real_name": "required",

		"user_phone": "required",

		"user_address": "required",

		"cart_id": "required",

		"freight_price": "required",

		"total_num": "required",

		"total_price": "required",

		"total_postage": "required",

		"pay_price": "required",

		"pay_postage": "required",

		"deduction_price": "required",

		"coupon_id": "required",

		"coupon_price": "required",

		"paid": "required",

		"pay_time": "required",

		"pay_type": "required",

		"add_time": "required",

		"status": "required",

		"is_stock_up": "required",

		"refund_status": "required",

		"refund_type": "required",

		"refund_express": "required",

		"refund_express_name": "required",

		"refund_reason_wap_img": "required",

		"refund_reason_wap_explain": "required",

		"refund_reason_time": "required",

		"refund_reason_wap": "required",

		"refund_reason": "required",

		"refund_price": "required",

		"delivery_name": "required",

		"delivery_code": "required",

		"delivery_type": "required",

		"delivery_id": "required",

		"kuaidi_label": "required",

		"kuaidi_task_id": "required",

		"kuaidi_order_id": "required",

		"fictitious_content": "required",

		"delivery_uid": "required",

		"gain_integral": "required",

		"use_integral": "required",

		"back_integral": "required",

		"spread_uid": "required",

		"spread_two_uid": "required",

		"one_brokerage": "required",

		"two_brokerage": "required",

		"mark": "required",

		"is_del": "required",

		"unique": "required",

		"remark": "required",

		"mer_id": "required",

		"is_mer_check": "required",

		"combination_id": "required",

		"pink_id": "required",

		"cost": "required",

		"seckill_id": "required",

		"bargain_id": "required",

		"advance_id": "required",

		"verify_code": "required",

		"store_id": "required",

		"shipping_type": "required",

		"clerk_id": "required",

		"is_channel": "required",

		"is_remind": "required",

		"is_system_del": "required",

		"channel_type": "required",

		"province": "required",

		"express_dump": "required",

		"virtual_type": "required",

		"virtual_info": "required",

		"pay_uid": "required",

		"custom_form": "required",

		"staff_id": "required",

		"agent_id": "required",

		"division_id": "required",

		"staff_brokerage": "required",

		"agent_brokerage": "required",

		"division_brokerage": "required",

	}
}

func (r *StoreOrderRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreOrderRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *StoreOrderRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
